package main

type Parent struct {
}

func (p *Parent) String() string {
	return "parent"
}

type Child struct {
	*Parent
}

func (c *Child) String() string {
	return "child"
}

func main() {
	parent := &Parent{}
	child := &Child{Parent: &Parent{}}
	println(parent.String(), child.String())
}
